home *** CD-ROM | disk | FTP | other *** search
- Path: canopus.cc.umanitoba.ca!umpaul18
- From: umpaul18@cc.umanitoba.ca (Kenneth Paulson)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: unsigned long addition question(GDS)
- Date: 14 Apr 1996 03:26:12 GMT
- Organization: University of Manitoba, Winnipeg, Manitoba, Canada
- Message-ID: <4kpr8k$pfi@canopus.cc.umanitoba.ca>
- References: <1052.6674T364T2106@infi.net>
- NNTP-Posting-Host: mira.cc.umanitoba.ca
-
- In article <1052.6674T364T2106@infi.net>, DHopkins <dhopkins@infi.net> wrote:
- >I'm using Gamesmith with SAS/C and have run into a complete
- >blank in my math knowledge. GDS uses an 8-bit color table
- >eg. 0x00rrggbb. Usually, I just ignore this type of stuff
- >but now it's hit me square in the face.
- >
- >I want to do a screen fade and figured that I'd use the
- >gs_SetRGB function to fade each color. the Commodore
- >version of SetRGB32 lets you enter a value for r, g, and b.
- >But gs_SetRGB only has 1 variable for the color, and it
- >has r,g,b embedded in it.(like I said, 0x00rrggbb). How
- >can I subtract from just r,g or b?
-
- Probably the easiest way to do this would be to keep the red, green, and
- blue components separate for whatever processing you want to do to them, and
- then slap the together, something like:
- rgb=(red<<16)|(green<<8)|blue
-
- (I *think* those values are right, I'm tired though...)
-
- Then you're left with a single GDS-friendly value.
-
- Stay Casual,
-
- Ken
-
-